package com.treasure.mall.biz.entity.order;

import com.treasure.mall.biz.entity.BasePO;
import com.treasure.mall.zbq.common.constant.Constant;
import com.treasure.mall.zbq.common.ienum.order.OrderEnums;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.time.LocalDateTime;

/**
 * 鉴定单
 *
 * @author allan
 * @version 1.0.0
 * @date 2020/6/11
 */
@Entity
@Table(name = "zb_identify_order")
@Setter
@Getter
@Cacheable(false)
public class IdentifyOrderPO extends BasePO {
    @Id
    @Column(name = "id", length = 30)
    private String id;
    /**
     * 关联的订单货品
     */
    @OneToOne
    @JoinColumn(name = "order_item_id", foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
    private OrderItemPO orderItemPO;
    /**
     * 鉴定机构
     */
    @Column(name = "identify_org_id")
    private int identifyOrg;
    /**
     * 鉴定状态
     */
    @Column(name = "identify_status")
    private OrderEnums.IdentifyStatus identifyStatus;
    /**
     * 鉴定时间
     */
    @Column(name = "identify_time", columnDefinition = Constant.DATE_COLUMN_DEFINITION)
    private LocalDateTime identifyTime;
    @Column(name = "deliver_status")
    private OrderEnums.DeliverStatus deliverStatus;
}
